﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="NewRequest.aspx.cs" Inherits="FundRaising.GUI.NewRequest" MasterPageFile="~/GUI/NewEntityMaster.Master" %>


<asp:Content ID="Content1" runat="server" 
    contentplaceholderid="ContentPlaceHolder1">

        
                             <table style="width:100%;">
                                 <tr>
                                     <td style="height: 25px; width: 449px">
                                         &nbsp;</td>
                                     <td dir="rtl" style="height: 25px; width: 306px; text-decoration: underline;">
                                         פרויקט</td>
                                     <td dir="rtl" style="height: 25px; width: 148px; text-decoration: underline;">
                                         בחר שם עמותה</td>
                                     <td dir="rtl" style="height: 25px; text-decoration: underline;">
                                         בחר שם קרן</td>
                                     <td dir="rtl" style="height: 25px; color: #FF0000; text-decoration: underline;">
                                         שנה</td>
                                     <td dir="rtl" style="height: 25px">
                                         &nbsp;</td>
                                 </tr>
                                 <tr>
                                     <td dir="rtl" style="width: 449px">
                                         <asp:Button ID="Button1" runat="server" Height="22px" onclick="Button1_Click" 
                                             style="margin-left: 47px" Text="החל יצירת בקשה" Width="114px" Font-Bold="True" 
                                             ForeColor="#006600" />
                                     </td>
                                     <td dir="rtl" style="width: 306px">
                                         <asp:DropDownList ID="DropDownList2" runat="server" 
                                             DataTextField="ProjectFld" 
                                             DataValueField="ProjectFld" Height="22px" 
                                             onselectedindexchanged="DropDownList2_SelectedIndexChanged" Width="128px" 
                                             AutoPostBack="True">
                                         </asp:DropDownList>
                                     </td>
                                     <td dir="rtl" style="width: 148px">
                                         <asp:DropDownList ID="DropDownList1" runat="server" 
                                             DataTextField="AssoName" 
                                             DataValueField="AssoName" Height="22px" Width="128px" AutoPostBack="True" 
                                             onselectedindexchanged="DropDownList1_SelectedIndexChanged">
                                         </asp:DropDownList>
                                     </td>
                                     <td dir="rtl">
                                         <asp:DropDownList ID="DropDownList4" runat="server" 
                                             Height="22px" 
                                             onselectedindexchanged="DropDownList4_SelectedIndexChanged" Width="128px" 
                                             AutoPostBack="True">
                                         </asp:DropDownList>
                                     </td>
                                     <td dir="rtl">
                                         <asp:DropDownList ID="DropDownList6" runat="server" Height="22px" Width="90px">
                                             <asp:ListItem>2009</asp:ListItem>
                                             <asp:ListItem>2010</asp:ListItem>
                                             <asp:ListItem Selected="True">2011</asp:ListItem>
                                             <asp:ListItem>2012</asp:ListItem>
                                             <asp:ListItem>2013</asp:ListItem>
                                             <asp:ListItem>2014</asp:ListItem>
                                         </asp:DropDownList>
                                     </td>
                                     <td dir="rtl">
                                         &nbsp;</td>
                                 </tr>
                                 <tr>
                                     <td style="width: 449px" dir="rtl">
                                         <asp:Button ID="Button2" runat="server" Font-Bold="True" ForeColor="#CC0000" 
                                             Height="22px" onclick="Button2_Click" Text="חזור לניהול בקשות " 
                                             Width="117px" />
                                     </td>
                                     <td style="width: 306px">
                                         &nbsp;</td>
                                     <td style="width: 148px">
                                         &nbsp;</td>
                                     <td>
                                         &nbsp;</td>
                                     <td>
                                         &nbsp;</td>
                                     <td>
                                         &nbsp;</td>
                                 </tr>
                                 <tr>
                                     <td style="width: 449px">
                                         &nbsp;</td>
                                     <td colspan="3" dir="rtl">
                                         <asp:DetailsView ID="DetailsView1" runat="server" AutoGenerateRows="False" 
                                             DataKeyNames="RequestKey" DataSourceID="RequestDataSource" DefaultMode="Insert" 
                                             Height="50px" Visible="False" Width="455px" 
                                             oniteminserting="DetailsView1_ItemInserting" CellPadding="4" 
                                             ForeColor="#333333" GridLines="None" 
                                             oniteminserted="DetailsView1_ItemInserted">
                                             <FooterStyle BackColor="#990000" Font-Bold="True" ForeColor="White" />
                                             <CommandRowStyle BackColor="#FFFFC0" Font-Bold="True" />
                                             <RowStyle BackColor="#FFFBD6" ForeColor="#333333" />
                                             <FieldHeaderStyle BackColor="#FFFF99" Font-Bold="True" />
                                             <PagerStyle BackColor="#FFCC66" ForeColor="#333333" HorizontalAlign="Center" />
                                             <Fields>
                                                 <asp:BoundField DataField="RequestKey" HeaderText="RequestKey" ReadOnly="True" 
                                                     SortExpression="RequestKey" Visible="False" />
                                                 <asp:BoundField DataField="RYear" HeaderText="RYear" SortExpression="RYear" 
                                                     Visible="False" />
                                                 <asp:BoundField DataField="AssoName" HeaderText="AssoName" 
                                                     SortExpression="AssoName" Visible="False" />
                                                 <asp:BoundField DataField="FundName" HeaderText="FundName" 
                                                     SortExpression="FundName" Visible="False" />
                                                 <asp:BoundField DataField="ProjectFld" HeaderText="ProjectFld" 
                                                     SortExpression="ProjectFld" Visible="False" />
                                                 <asp:TemplateField HeaderText="תת פרויקט" SortExpression="SubProj">
                                                     <EditItemTemplate>
                                                         <asp:TextBox ID="TextBox1" runat="server" Text='<%# Bind("SubProj") %>' 
                                                             AutoPostBack="True" ontextchanged="TextBox1_TextChanged"></asp:TextBox>
                                                     </EditItemTemplate>
                                                     <InsertItemTemplate>
                                                         <asp:DropDownList ID="DropDownList3" runat="server" Height="22px" Width="128px" 
                                                             AutoPostBack="True" onselectedindexchanged="DropDownList3_SelectedIndexChanged">
                                                         </asp:DropDownList>
                                                     </InsertItemTemplate>
                                                     <ItemTemplate>
                                                         <asp:Label ID="Label1" runat="server" Text='<%# Bind("SubProj") %>'></asp:Label>
                                                     </ItemTemplate>
                                                 </asp:TemplateField>
                                                 <asp:TemplateField HeaderText="תחום קרן" SortExpression="ActivetyFLD">
                                                     <EditItemTemplate>
                                                         <asp:TextBox ID="TextBox2" runat="server" Text='<%# Bind("ActivetyFLD") %>'></asp:TextBox>
                                                     </EditItemTemplate>
                                                     <InsertItemTemplate>
                                                         <asp:DropDownList ID="DropDownList5" runat="server" Height="22px" Width="128px" 
                                                             AutoPostBack="True" onselectedindexchanged="DropDownList5_SelectedIndexChanged">
                                                         </asp:DropDownList>
                                                     </InsertItemTemplate>
                                                     <ItemTemplate>
                                                         <asp:Label ID="Label2" runat="server" Text='<%# Bind("ActivetyFLD") %>'></asp:Label>
                                                     </ItemTemplate>
                                                 </asp:TemplateField>
                                                 <asp:TemplateField HeaderText=" איך הוגש" SortExpression="SubmiMethod">
                                                     <EditItemTemplate>
                                                         <asp:TextBox ID="TextBox5" runat="server" Text='<%# Bind("SubmiMethod") %>'></asp:TextBox>
                                                     </EditItemTemplate>
                                                     <InsertItemTemplate>
                                                         <asp:TextBox ID="TextBox2" runat="server" Text='<%# Bind("SubmiMethod") %>'></asp:TextBox>
                                                     </InsertItemTemplate>
                                                     <ItemTemplate>
                                                         <asp:Label ID="Label5" runat="server" Text='<%# Bind("SubmiMethod") %>'></asp:Label>
                                                     </ItemTemplate>
                                                 </asp:TemplateField>
                                                 <asp:TemplateField HeaderText="סכום במוקש" SortExpression="MoneyRequested">
                                                     <EditItemTemplate>
                                                         <asp:TextBox ID="TextBox6" runat="server" Text='<%# Bind("MoneyRequested") %>'></asp:TextBox>
                                                     </EditItemTemplate>
                                                     <InsertItemTemplate>
                                                         <asp:TextBox ID="TextBox3" runat="server" Text='<%# Bind("MoneyRequested") %>'></asp:TextBox>
                                                         &nbsp;
                                                         <asp:CompareValidator ID="CompareValidator6" runat="server" 
                                                             ControlToValidate="TextBox3" EnableClientScript="False" 
                                                             ErrorMessage="CompareValidator" Operator="DataTypeCheck" ToolTip="שדה מספרי" 
                                                             Type="Integer">?</asp:CompareValidator>
                                                     </InsertItemTemplate>
                                                     <ItemTemplate>
                                                         <asp:Label ID="Label6" runat="server" Text='<%# Bind("MoneyRequested") %>'></asp:Label>
                                                     </ItemTemplate>
                                                 </asp:TemplateField>
                                                 <asp:TemplateField HeaderText="סכום צפוי" SortExpression="MoneyExpected">
                                                     <EditItemTemplate>
                                                         <asp:TextBox ID="TextBox7" runat="server" Text='<%# Bind("MoneyExpected") %>'></asp:TextBox>
                                                     </EditItemTemplate>
                                                     <InsertItemTemplate>
                                                         <asp:TextBox ID="TextBox4" runat="server" Text='<%# Bind("MoneyExpected") %>'></asp:TextBox>
                                                         &nbsp;&nbsp;
                                                         <asp:CompareValidator ID="CompareValidator7" runat="server" 
                                                             ControlToValidate="TextBox4" EnableClientScript="False" 
                                                             ErrorMessage="CompareValidator" Operator="DataTypeCheck" ToolTip="שדה מספרי" 
                                                             Type="Integer">?</asp:CompareValidator>
                                                     </InsertItemTemplate>
                                                     <ItemTemplate>
                                                         <asp:Label ID="Label7" runat="server" Text='<%# Bind("MoneyExpected") %>'></asp:Label>
                                                     </ItemTemplate>
                                                 </asp:TemplateField>
                                                 <asp:TemplateField HeaderText="תאריך קבלה צפוי" SortExpression="DateExpected">
                                                     <EditItemTemplate>
                                                         <asp:TextBox ID="TextBox8" runat="server" Text='<%# Bind("DateExpected") %>'></asp:TextBox>
                                                     </EditItemTemplate>
                                                     <InsertItemTemplate>
                                                         <asp:TextBox ID="DateExpected" runat="server" 
                                                             Text='<%# Bind("DateExpected") %>'></asp:TextBox>
                                                         &nbsp;
                                                         <asp:RegularExpressionValidator ID="RegularExpressionValidator5" runat="server" 
                                                             ControlToValidate="DateExpected" ErrorMessage="תאריך לא תקין" 
                                                             SetFocusOnError="True" ToolTip="dd/mm/yyyy" 
                                                             ValidationExpression="([0-3][0-9].[0-1][0-9].[1-2][0-9][0-9][0-9])">?</asp:RegularExpressionValidator>
                                                     </InsertItemTemplate>
                                                     <ItemTemplate>
                                                         <asp:Label ID="Label8" runat="server" Text='<%# Bind("DateExpected") %>'></asp:Label>
                                                     </ItemTemplate>
                                                 </asp:TemplateField>
                                                 <asp:TemplateField HeaderText="תאריך שליחה" SortExpression="RequestSntDate">
                                                     <EditItemTemplate>
                                                         <asp:TextBox ID="TextBox9" runat="server" Text='<%# Bind("RequestSntDate") %>'></asp:TextBox>
                                                     </EditItemTemplate>
                                                     <InsertItemTemplate>
                                                         <asp:TextBox ID="TextBox6" runat="server" Text='<%# Bind("RequestSntDate") %>'></asp:TextBox>
                                                         &nbsp;
                                                         <asp:RegularExpressionValidator ID="RegularExpressionValidator44" 
                                                             runat="server" ControlToValidate="TextBox6" ErrorMessage="תאריך לא תקין" 
                                                             SetFocusOnError="True" ToolTip="dd/mm/yyyy" 
                                                             ValidationExpression="([0-3][0-9].[0-1][0-9].[1-2][0-9][0-9][0-9])">?</asp:RegularExpressionValidator>
                                                     </InsertItemTemplate>
                                                     <ItemTemplate>
                                                         <asp:Label ID="Label9" runat="server" Text='<%# Bind("RequestSntDate") %>'></asp:Label>
                                                     </ItemTemplate>
                                                 </asp:TemplateField>
                                                 <asp:TemplateField HeaderText="עבור מה" SortExpression="ForWhat">
                                                     <EditItemTemplate>
                                                         <asp:TextBox ID="TextBox4" runat="server" Text='<%# Bind("ForWhat") %>'></asp:TextBox>
                                                     </EditItemTemplate>
                                                     <InsertItemTemplate>
                                                         <asp:TextBox ID="TextBox1" runat="server" Height="44px" 
                                                             Text='<%# Bind("ForWhat") %>' Width="300px"></asp:TextBox>
                                                     </InsertItemTemplate>
                                                     <ItemTemplate>
                                                         <asp:Label ID="Label4" runat="server" Text='<%# Bind("ForWhat") %>'></asp:Label>
                                                     </ItemTemplate>
                                                 </asp:TemplateField>
                                                 <asp:TemplateField HeaderText="סטטוס בקשה" SortExpression="RStatus">
                                                     <EditItemTemplate>
                                                         <asp:TextBox ID="TextBox3" runat="server" Text='<%# Bind("RStatus") %>'></asp:TextBox>
                                                     </EditItemTemplate>
                                                     <InsertItemTemplate>
                                                         <asp:DropDownList ID="DropDownList7" runat="server" Height="22px" 
                                                             SelectedValue='<%# Bind("RStatus") %>' Width="160px">
                                                             <asp:ListItem>בקשה נשלחה</asp:ListItem>
                                                             <asp:ListItem>בקשה נשלחה + צפי הכנה </asp:ListItem>
                                                             <asp:ListItem>ממתין - הגיע ליעד</asp:ListItem>
                                                             <asp:ListItem>חיובי - הכנסה עתידית</asp:ListItem>
                                                             <asp:ListItem>תשלום נכנס - סגור</asp:ListItem>
                                                             <asp:ListItem>שלילי</asp:ListItem>
                                                         </asp:DropDownList>
                                                     </InsertItemTemplate>
                                                     <ItemTemplate>
                                                         <asp:Label ID="Label3" runat="server" Text='<%# Bind("RStatus") %>'></asp:Label>
                                                     </ItemTemplate>
                                                 </asp:TemplateField>
                                                 <asp:TemplateField ShowHeader="False">
                                                     <InsertItemTemplate>
                                                         <asp:LinkButton ID="LinkButton1" runat="server" CausesValidation="True" 
                                                             CommandName="Insert" Text="הכנס"></asp:LinkButton>
                                                         &nbsp;&nbsp;&nbsp;&nbsp; &nbsp;
                                                     </InsertItemTemplate>
                                                     <ItemTemplate>
                                                         <asp:LinkButton ID="LinkButton1" runat="server" CausesValidation="False" 
                                                             CommandName="New" Text="New"></asp:LinkButton>
                                                     </ItemTemplate>
                                                 </asp:TemplateField>
                                             </Fields>
                                             <HeaderStyle BackColor="#990000" Font-Bold="True" ForeColor="White" />
                                             <AlternatingRowStyle BackColor="White" />
                                         </asp:DetailsView>
                                         <asp:ObjectDataSource ID="RequestDataSource" runat="server" 
                                             InsertMethod="InsertNewRequest" SelectMethod="GetData" 
                                             TypeName="FundRaising.BLL.RequestBLL" 
                                             OldValuesParameterFormatString="original_{0}">
                                             <InsertParameters>
                                                 <asp:Parameter Name="RYear" Type="String" />
                                                 <asp:Parameter Name="AssoName" Type="String" />
                                                 <asp:Parameter Name="ActivetyFLD" Type="String" />
                                                 <asp:Parameter Name="FundName" Type="String" />
                                                 <asp:Parameter Name="ProjectFld" Type="String" />
                                                 <asp:Parameter Name="SubProj" Type="String" />
                                                 <asp:Parameter Name="ForWhat" Type="String" />
                                                 <asp:Parameter Name="SubmiMethod" Type="String" />
                                                 <asp:Parameter Name="MoneyRequested" Type="Single" />
                                                 <asp:Parameter Name="MoneyExpected" Type="Single" />
                                                 <asp:Parameter Name="DateExpected" Type="String" />
                                                 <asp:Parameter Name="RequestSntDate" Type="String" />
                                                 <asp:Parameter Name="RStatus" Type="String" />
                                                 <asp:Parameter Name="RequestKey" Type="String" />
                                             </InsertParameters>
                                         </asp:ObjectDataSource>
                                     </td>
                                     <td dir="rtl">
                                         &nbsp;</td>
                                     <td>
                                         &nbsp;</td>
                                 </tr>
                                 <tr>
                                     <td style="width: 449px">
                                         &nbsp;</td>
                                     <td style="width: 306px">
                                         &nbsp;</td>
                                     <td style="width: 148px">
                                         &nbsp;</td>
                                     <td>
                                         &nbsp;</td>
                                     <td>
                                         &nbsp;</td>
                                     <td>
                                         &nbsp;</td>
                                 </tr>
    </table>


</asp:Content>
